<php>function _get_system_widget($name,$data){</php>
<php>
	$admin = $data['admin'];
    $configinfo = $data['configinfo'];
    $adminmodulemenu = $data['adminmodulemenu'];
    $site_info = cmf_get_option('site_info');
    $dashboard_widget_plugins = $data['dashboard_widget_plugins'];
</php>
<switch name="name">
    <case value="MainContributors">
    <div style="margin-left:-5px; margin-right:-5px;">
      <div class="col-md-4" style="float:left;">
        {$dashboard_widget_plugins['SystemInfo']['view']}
      </div>
      <div class="col-md-4" style="float:left;">
        <div class="panel panel-default" style=" height:320px; overflow:hidden;">
            <div class="panel-heading">
                <h3 class="panel-title">网站信息</h3>
            </div>
            <div class="panel-body home-info">
                <ul class="list-unstyled">
                    <li>
                        <em>网站名称</em>
                        <span>
                        	{$site_info.site_name}
                        </span>
                    </li>
                    <li>
                        <em>ICP备</em>
                        <span>
                        	<php>$site_info['site_icp'] = $site_info['site_icp'] ? $site_info['site_icp'] : "未填写";</php>
                        	{$site_info.site_icp}
                        </span>
                    </li>
                    <li>
                        <em>公网安备</em>
                        <span>
                        	<php>$site_info['site_gwa'] = $site_info['site_gwa'] ? $site_info['site_gwa'] : "未填写";</php>
                        	{$site_info.site_gwa}
                        </span>
                    </li>
                    <li>
                        <em>站长邮箱</em>
                        <span>
                        	<php>$site_info['site_admin_email'] = $site_info['site_admin_email'] ? $site_info['site_admin_email'] : "未填写";</php>
                        	{$site_info.site_admin_email}
                        </span>
                    </li>
                    <li>
                        <em>统计代码</em>
                        <span>
                        	<php>$site_info['site_analytics'] = $site_info['site_analytics'] ? $site_info['site_analytics'] : "未填写";</php>
                        	{$site_info.site_analytics}
                        </span>
                    </li>
                    <li>
                        <em>公告信息</em>
                        <span>
                        	<php>$site_info['gginfo'] = $site_info['gginfo'] ? $site_info['gginfo'] : "未填写";</php>
                        	{$site_info.gginfo}
                        </span>
                    </li>
                </ul>
            </div>
        </div>
      </div>
      <div class="col-md-4" style="float:left;">
      	<div class="panel panel-default" style=" height:320px; overflow:hidden;">
            <div class="panel-heading">
                <h3 class="panel-title">用户信息</h3>
            </div>
            <div class="panel-body home-info">
                <ul class="list-unstyled">
                	<li>
                        <em>
                        <if condition="isset($admin['avatar']) && $admin['avatar']">
                            <img class="nav-user-photo" width="100" height="100"
                                 src="{:cmf_get_user_avatar_url($admin['avatar'])}" alt="{$admin.user_login}" style="border-radius:50%; border: 4px solid #b8d7ef;">
                            <else/>
                            <img class="nav-user-photo" width="100" height="100"
                                 src="/plugins/modulepara/configdata/images/avatars/avatar{$configinfo['adminface']}.png" alt="{$admin.user_login|default=''}" style="border-radius:50%; border: 4px solid #b8d7ef;">
                        </if>
                        </em>
                    </li>
                    <li>
                        <em>用户名</em>
                        <span>
                        	{$admin['user_login']}
                        </span>
                    </li>
                    <li>
                        <em>姓名</em>
                        <span>
                        	<php>$admin['user_nickname'] = $admin['user_nickname'] ? $admin['user_nickname'] : "未填写";</php>
                        	{$admin['user_nickname']}
                        </span>
                    </li>
                    <li>
                        <em>性别</em>
                        <span>
                        	<php>$sexs=array("0"=>lang('GENDER_SECRECY'),"1"=>lang('MALE'),"2"=>lang('FEMALE'));</php>
                            {$sexs[$admin['sex']]}
                        </span>
                    </li>
                    <li>
                        <em>生日</em>
                        <span>
                            {:date('Y-m-d',$admin['birthday'])}
                        </span>
                    </li>
                    <li style="margin-top:10px;">
                        <em>个人网址</em>
                        <span>
                        	<php>$admin['user_url'] = $admin['user_url'] ? $admin['user_url'] : "未填写";</php>
                            <a href="{$admin['user_url']}" target="_blank">{$admin['user_url']}</a>
                        </span>
                    </li>
                    <li>
                        <em>邮箱地址</em>
                        <span>
                        	<php>$admin['user_email'] = $admin['user_email'] ? $admin['user_email'] : "未填写";</php>
                            {$admin['user_email']}
                        </span>
                    </li>
                    <li>
                        <em>最后登录IP</em>
                        <span>
                        	<php>$admin['last_login_ip'] = $admin['last_login_ip'] ? $admin['last_login_ip'] : "未填写";</php>
                            {$admin['last_login_ip']}
                        </span>
                    </li>
                    <li>
                        <em>最后登录时间</em>
                        <span>
                        	<php>$admin['last_login_time'] = $admin['last_login_time'] ? $admin['last_login_time'] : "未填写";</php>
                            {:date('Y-m-d H:i:s',$admin['last_login_time'])}
                        </span>
                    </li>
                    <li>
                        <em>个性签名</em>
                        <span>
                        	<php>$admin['signature'] = $admin['signature'] ? $admin['signature'] : "未填写";</php>
                            {$admin['signature']}
                        </span>
                    </li>
                </ul>
            </div>
        </div>
      </div>
    </div>
    </case>
    <case value="SystemInfo">
    <php>if($configinfo['shopok'] == 1){</php>
    <style>
		.panel-statistics h4 {
			color: inherit;
			font-weight: blod;
			font-size: 16px;
		}
	
		.panel-statistics h3 {
			font-weight: 500;
			font-size: 14px;
			color: #333;
		}
	
		.panel-statistics em {
			font-style: normal;
		}
	
		.panel-statistics .pull-right {
			padding-right: 10px;
		}
	
		.panel-statistics .table thead tr th {
			font-weight: normal;
		}
	
		.panel-statistics .table tbody tr td {
			font-weight: normal;
			vertical-align: middle;
		}
	
		.panel-statistics .table tbody tr td p {
			margin: 0;
		}
	</style>
    <div style="margin-left:-5px; margin-right:-5px;">
        <div class="col-xs-6 col-sm-3" style="float:left;">
            <div class="panel panel-default panel-intro panel-statistics">
                <div class="panel-body">
                    <div class="pull-left">
                        <h4>总订单金额</h4>
                        <h3>￥24218.50</h3>
                    </div>
    
                    <div class="pull-right" style="color:#c8cfff;">
                        <i class="fa fa-cny fa-4x"></i>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xs-6 col-sm-3" style="float:left;">
            <div class="panel panel-default panel-intro panel-statistics">
                <div class="panel-body">
                    <div class="pull-left">
                        <h4>今日订单金额</h4>
                        <h3>￥484.00 <em data-toggle="tooltip" data-title="昨日：￥468.00" class="text-success" data-original-title="" title="">+4%</em></h3>
                    </div>
    
                    <div class="pull-right" style="color:#ffc8c8;">
                        <i class="fa fa-calendar fa-4x"></i>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xs-6 col-sm-3" style="float:left;">
            <div class="panel panel-default panel-intro panel-statistics">
                <div class="panel-body">
                    <div class="pull-left">
                        <h4>总用户数</h4>
                        <h3>5723</h3>
                    </div>
    
                    <div class="pull-right" style="color:#c8e3ff;">
                        <i class="fa fa-users fa-4x"></i>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xs-6 col-sm-3" style="float:left;">
            <div class="panel panel-default panel-intro panel-statistics">
                <div class="panel-body">
                    <div class="pull-left">
                        <h4>今日新增用户数</h4>
                        <h3>116 <em data-toggle="tooltip" data-title="昨日：135" class="text-danger" data-original-title="" title="">-14%</em></h3>
                    </div>
    
                    <div class="pull-right" style="color:#ffe9c8;">
                        <i class="fa fa-user fa-4x"></i>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <php>}</php>
    </case>
    <case value="Custom1">
    <php>if($configinfo['shopok'] == 1){</php>
    <div style="margin-left:-5px; margin-right:-5px;">
    	<div class="col-md-8" style="float:left;">
        	<div class="panel panel-default" style=" height:350px; overflow:hidden;">
                <div class="panel-heading">
                    <h3 class="panel-title">订单统计</h3>
                </div>
                <div class="panel-body home-info">
                    <div id="ordertj-container" style="min-width:290px;height:290px"></div>
                </div>
            </div>
        </div>
    	<div class="col-md-4" style="float:left;">
            <div class="panel panel-default" style=" height:350px; overflow:hidden;">
                <div class="panel-heading">
                    <h3 class="panel-title">营业额占比</h3>
                </div>
                <div class="panel-body home-info">
                    <div id="orderzb-container" style="min-width:290px;height:290px"></div>
                </div>
            </div>
        </div>
    </div>
    <php>}</php>
    </case>
    <case value="Custom2">
    <php>if($configinfo['shopok'] == 1){</php>
    	<div class="panel panel-default" style=" height:350px; overflow:hidden;">
            <div class="panel-heading">
                <h3 class="panel-title">订单趋势</h3>
            </div>
            <div class="panel-body home-info">
				<div id="orderqs-container" style="min-width:290px;height:290px"></div>
            </div>
        </div>
    <php>}</php>
    </case>
    <case value="Contributors">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">栏目模块</h3>
            </div>
            <div class="panel-body home-info">
                
                <div class="wb-container ">
                  <style type='text/css'>
					.wb-container *{ box-sizing: border-box; margin:0; padding:0;}
					.wb-container a{ text-decoration:none;}
					.panel-heading{ padding:10px 15px;}
					.panel-heading span{ display:inline-block; width:2px; background:#15a589; height:15px; position:relative; top:3px; left:-3px;}
					.media-body{    display: table-cell; vertical-align: top; padding-left: 10px;}
					.feed-activity-list {
						width: 100%;
						overflow: hidden;
					}
					.feed-element {
						float: left;
						width: 19%;
						height: 100px;
						margin: 0 0.5%;
						margin-bottom: 20px;
						border: 1px solid #ddd;
						border-radius:4px;
						padding: 20px;
					}
					.feed-element::after {
						display: none
					}
					.feed-element .title {
						font-size: 14px;
						height: 24px;
						line-height: 24px;
						vertical-align: bottom;
						color: #333;
						font-weight: bold;
						overflow:hidden;
						display:block;
					}
					.feed-element img.img-circle,
					.dropdown-messages-box img.img-circle {
						float: left;
						width: 60px;
						height: 60px;
						border-radius: 4px;
					}
					.media-body {
						margin-top: 3px;
					}
					.text-muted {
						display: block;
						overflow: hidden;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-line-clamp: 2;
						-webkit-box-orient: vertical;
					}
					</style>
                  <div class="page-content" style="background:#fff;">
                    <div class='panel panel-default' style='border:none;'>
                      <div class="feed-activity-list">
                      <php>$menui=0;</php>
                      <php>$menui2=0;</php>
                      <foreach name="adminmodulemenu" item="menu" key="k">
                      
                      <php>if($menu['index_num'] == "自定义区块"){</php>
                      <php>foreach($menu['menu2'] as $k2 => $menu2){</php>
                      <php>if($menu2['index_num'] != "自定义扩展"){</php>
                      <php>$menui2++;</php>
                      <php>if($menui2 <= $configinfo['adminindexblocknum']){</php> 
                      <a class="feed-element" href="/portal/admin_article/index/category/{$menu2['id']}.html?backOk=1" data-name="{$menu2['name']}">
                        <span class="pull-left">
                          <img src="/plugins/modulepara/configdata/images/app/app{$menui2}.jpg" class="img-circle" alt="image" onerror="this.src='/plugins/modulepara/configdata/images/app/app.jpg'">
                        </span>
                        <div class="media-body">
                          <span class="title"><span class="fl">{$menu2['name']}</span></span>
                          <small class="text-muted"><notempty name="menu2['description']">{$menu2['description']}<else/>{$menu2['name']}</notempty></small>
                        </div>
                      </a>
                      <php>}</php>
                      <php>}</php>
                      <php>}</php>
                      <php>}</php>
                      
                      <php>if($menu['index_num'] != "自定义区块" && $menu['index_num'] != "自定义配置" && $menu['index_num'] != "自定义扩展"){</php>
                      <php>$menui++;</php>
                      <php>if($menui <= $configinfo['adminindexmodulenum']){</php> 
                      <php>$menui_key=$menui+$configinfo['adminindexblocknum'];</php>
                      <a class="feed-element" href="/portal/admin_article/index/category/{$menu['id']}.html?backOk=1" data-name="{$menu['name']}">
                        <span class="pull-left">
                          <img src="/plugins/modulepara/configdata/images/app/app{$menui_key}.jpg" class="img-circle" alt="image" onerror="this.src='/plugins/modulepara/configdata/images/app/app.jpg'">
                        </span>
                        <div class="media-body">
                          <span class="title"><span class="fl">{$menu['name']}</span></span>
                          <small class="text-muted"><notempty name="menu['description']">{$menu['description']}<else/>{$menu['name']}</notempty></small>
                        </div>
                      </a>
                      <php>}</php>
                      <php>}</php>
                      
                      </foreach>
                      </div>
                    </div>
                  </div>
                </div>
                
            </div>

        </div>
		<php>if($menui == 0){</php>
		<style>.Contributors{ display: none;}</style>
		<php>}</php>
    </case>
    <case value="CmfHub">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">关于纵利</h3>
            </div>
            <div class="panel-body home-info">
                <ul class="list-unstyled">
                    <li>
                        {$configinfo['fastxcms']}始于 2007 年，以网站建设、移动互联网、小程序开发、APP 开发为核心业务，专注于设计体验研究、技术研发、品牌营销，为客户提供一站式互联网解决方案，努力为客户创造最大的价值。 多年来，{$configinfo['fastxcms']}以建立行业服务品质标杆为目标,不断提升服务质量，推动行业发展。<a href="{$configinfo['fastxcmsurl']}" target="_blank">{$configinfo['fastxcms']}</a>
                    </li>
                </ul>
            </div>
        </div>
    </case>
    <case value="CmfDocuments">
    <php>if($configinfo['apinewsok'] == 1){</php>
    <style>.CmfDocuments{ display:block;}</style>
    <div style="margin-left:-5px; margin-right:-5px;">
      <div class="col-md-4" style="float:left;">
        <div class="panel panel-default" style=" height:350px; overflow:hidden;">
            <div class="panel-heading">
                <h3 class="panel-title">{$configinfo['adminnews1name']}</h3>
            </div>
            <div class="panel-body home-info">
                <ul id="thinkcmf-notices" class="list-unstyled">
                    <li>
                        <img src="__TMPL__/public/assets/images/loading.gif" style="vertical-align: middle;"/>
                        <span style="display: inline-block; vertical-align: middle;">加载中...</span>
                    </li>
                </ul>
            </div>
        </div>
      </div>
      <div class="col-md-4" style="float:left;">
        <div class="panel panel-default" style=" height:350px; overflow:hidden;">
            <div class="panel-heading">
                <h3 class="panel-title">{$configinfo['adminnews2name']}</h3>
            </div>
            <div class="panel-body home-info">
                <ul id="thinkcmf-notices2" class="list-unstyled">
                    <li>
                        <img src="__TMPL__/public/assets/images/loading.gif" style="vertical-align: middle;"/>
                        <span style="display: inline-block; vertical-align: middle;">加载中...</span>
                    </li>
                </ul>
            </div>
        </div>
      </div>
      <div class="col-md-4" style="float:left;">
      	<div class="panel panel-default" style=" height:350px; overflow:hidden;">
            <div class="panel-heading">
                <h3 class="panel-title">{$configinfo['adminnews3name']}</h3>
            </div>
            <div class="panel-body home-info">
                <ul id="thinkcmf-notices3" class="list-unstyled">
                    <li>
                        <img src="__TMPL__/public/assets/images/loading.gif" style="vertical-align: middle;"/>
                        <span style="display: inline-block; vertical-align: middle;">加载中...</span>
                    </li>
                </ul>
            </div>
        </div>
      </div>
    </div>
    <php>}</php>
    </case>
</switch>
<php>}</php>

<include file="public@header"/>
<style>
	.home-info{ line-height:1.8;}
    .home-info li em {
        float: left;
        width: 120px;
        font-style: normal;
        font-weight: bold;
    }

    .home-info ul {
        padding: 0;
        margin: 0;
    }

    .panel {
        margin-bottom: 0;
    }

    .grid-sizer {
        width: 10%;
    }

    .grid-item {
        margin-bottom: 5px;
        padding: 5px;
    }

    .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
        padding-left: 5px;
        padding-right: 5px;
        float: none;
    }
	.emallCopyright {
		position: fixed;
		bottom: 0;
		left: 0;
		padding: 10px 25px;
		background: #e8edf0;
		width: 100%;
		border-top: 1px solid #ccc;
	}
	.Custom1,.Custom2,.Custom3,.Custom4,.Custom5,.SystemInfo,.CmfDocuments{ display:none;}
</style>
<hook name="admin_before_head_end"/>
</head>
<body>
<div class="wrap">
    <empty name="has_smtp_setting">
        <div class="grid-item col-md-12">
            <div class="alert alert-danger alert-dismissible fade in" role="alert" style="margin-bottom: 0;">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <strong>提示!</strong> 邮箱配置未完成,无法进行邮件发送!
                <a href="#" data-dismiss="alert" aria-label="Close"
                   onclick="parent.openapp('{:url('Mailer/index')}','admin_mailer_index','邮箱配置');">现在设置</a>
            </div>
        </div>
    </empty>

    <if condition="!extension_loaded('fileinfo')">
        <div class="grid-item col-md-12">
            <div class="alert alert-danger alert-dismissible fade in" role="alert" style="margin-bottom: 0;">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <strong>提示!</strong> php_fileinfo扩展没有开启，无法正常上传文件！
            </div>
        </div>
    </if>

    <div class="home-grid">
        <!-- width of .grid-sizer used for columnWidth -->
        <div class="grid-sizer"></div>
        <foreach name="dashboard_widgets" item="vo">
            <if condition="$vo.is_system">
                <div class="grid-item col-md-12 {$vo.name}" data-system="1" data-widget="{$vo.name}">
                    <div class="dashboard-box">{:_get_system_widget($vo.name,array('admin'=>$admin, 'configinfo'=>$configinfo, 'adminmodulemenu'=>$adminmodulemenu, 'dashboard_widget_plugins'=>$dashboard_widget_plugins))}</div>
                </div>
            </if>
        </foreach>
    </div>
</div>
<php>if($configinfo['shopok'] == 1){</php>
<style>.Custom1,.Custom2,.SystemInfo{ display:block;}</style>
<script src="/plugins/modulepara/configdata/backend/js/highcharts.js"></script>
<script src="/plugins/modulepara/configdata/backend/js/exporting.js"></script>
<script src="/plugins/modulepara/configdata/backend/js/highcharts-zh_CN.js"></script>
<script>
var chart = Highcharts.chart('orderqs-container',{
	chart: {
		type: 'area'
	},
	title: {
		text: '本月订单趋势统计'
	},
	subtitle: {
		text: '总订单数量：100 订单总价格：￥5000元'
	},
	legend: {
        layout: 'vertical',
        align: 'left',
        verticalAlign: 'top',
        x: 150,
        y: 100,
        floating: true,
        borderWidth: 1,
        backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
    },
	xAxis: {
		allowDecimals: false
	},
	yAxis: {
		title: {
			text: '订单总金额'
		},
		labels: {
			formatter: function () {
				return this.value / 1000 + 'k';
			}
		}
	},
	tooltip: {
		pointFormat: '{series.name} 订单金额 <b>{point.y:,.0f}</b>元'
	},
	plotOptions: {
		area: {
			pointStart: 1940,
			marker: {
				enabled: false,
				symbol: 'circle',
				radius: 2,
				states: {
					hover: {
						enabled: true
					}
				}
			}
		}
	},
	series: [{
		name: '营业额',
		data: [null, null, null, null, null, 6, 11, 32, 110, 235, 369, 640,
			   1005, 1436, 2063, 3057, 4618, 6444, 9822, 15468, 20434, 24126,
			   27387, 29459, 31056, 31982, 32040, 31233, 29224, 27342, 26662,
			   26956, 27912, 28999, 28965, 27826, 25579, 25722, 24826, 24605,
			   24304, 23464, 23708, 24099, 24357, 24237, 24401, 24344, 23586,
			   22380, 21004, 17287, 14747, 13076, 12555, 12144, 11009, 10950,
			   10871, 10824, 10577, 10527, 10475, 10421, 10358, 10295, 10104]
	}]
});
var chart = Highcharts.chart('ordertj-container', {
    chart: {
        zoomType: 'xy'
    },
    title: {
        text: '订单月平均数量和营业额'
    },
    subtitle: {
        text: '总订单数量：100 订单总价格：￥5000元'
    },
    xAxis: [{
        categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
                     'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
        crosshair: true
    }],
    yAxis: [{ // Primary yAxis
        labels: {
            format: '{value}个',
            style: {
                color: Highcharts.getOptions().colors[1]
            }
        },
        title: {
            text: '订单数',
            style: {
                color: Highcharts.getOptions().colors[1]
            }
        }
    }, { // Secondary yAxis
        title: {
            text: '订单额',
            style: {
                color: Highcharts.getOptions().colors[0]
            }
        },
        labels: {
            format: '{value}元',
            style: {
                color: Highcharts.getOptions().colors[0]
            }
        },
        opposite: true
    }],
    tooltip: {
        shared: true
    },
    legend: {
        layout: 'vertical',
        align: 'left',
        x: 120,
        verticalAlign: 'top',
        y: 100,
        floating: true,
        backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
    },
    series: [{
        name: '订单数',
        type: 'column',
        yAxis: 1,
        data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
        tooltip: {
            valueSuffix: ' mm'
        }
    }, {
        name: '订单额',
        type: 'spline',
        data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6],
        tooltip: {
            valueSuffix: '°C'
        }
    }]
});
Highcharts.chart('orderzb-container', {
		chart: {
				plotBackgroundColor: null,
				plotBorderWidth: null,
				plotShadow: false,
				type: 'pie'
		},
		title: {
				text: '订单每月市场份额占比'
		},
		subtitle: {
			text: '每月订单总营业额占比统计'
		},
		tooltip: {
				pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
		},
		plotOptions: {
				pie: {
						allowPointSelect: true,
						cursor: 'pointer',
						dataLabels: {
								enabled: true,
								format: '<b>{point.name}</b>: {point.percentage:.1f} %',
								style: {
										color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
								}
						}
				}
		},
		series: [{
				name: 'Brands',
				colorByPoint: true,
				data: [{
						name: '一月',
						y: 61.41,
						sliced: true,
						selected: true
				}, {
						name: '二月',
						y: 11.84
				}, {
						name: '三月',
						y: 10.85
				}, {
						name: '四月',
						y: 4.67
				}, {
						name: '五月',
						y: 4.18
				}, {
						name: '六月',
						y: 1.64
				}, {
						name: '七月',
						y: 1.6
				}, {
						name: '八月',
						y: 1.2
				}, {
						name: '九月',
						y: 2.61
				}]
		}]
});
</script>
<php>}</php>
<php>if($configinfo['versionok'] == 1){
$site_info = cmf_get_option('site_info');</php>
<style>.wrap{ padding-bottom:60px!important;}</style>
<div class="emallCopyright"><strong style="color:#dd2727">ModulePara模块参数版本：{$configinfo['moduleparav']}，StylePlugins样式插件版本：{$configinfo['stylepluginsv']}，ThinkCMFS版本：{$configinfo['fastxcmsv']}</strong> Powered by <a href="/" target="_blank">ThinkCMFS企业信息模块化管理系统</a> <a href="javascript:openPageLayer(['60%', '70%'],'ThinkCMFS使用说明','configdesc');" style="float:right;">【使用说明】</a>
<div style="clear:both"></div></div>
<div id="configdesc" style="display:none;">
    <div style="background: #ecf7ff; border: 1px solid #bcddf7; padding: 10px; color:#333; border-radius: 5px; margin:10px;">
        <p style="word-break:break-all;">| == 【modulepara】模块参数插件主要配置说明 == |</p>
        <p style="word-break:break-all;">推荐环境：PHP7.1+Mysql5.7【PHPStudy8】</p>
        <p style="word-break:break-all;">测试信息：可关闭测试信息将config.php配置中的【testconfigok】设置为0即可</p>
        <p style="word-break:break-all;">提示配置：为了使程序与模板分离，请将所有新增程序与配置在模板目录中配置</p>
        <p style="word-break:break-all;">后台菜单：【方法一】在【系统配置】下的【栏目菜单配置】中即可关闭栏目对应的所有功能</p>
        <p style="word-break:break-all;">【方法二】程序配置【colids】关闭一级栏目菜单 【colids2】关闭二级栏目菜单 【colids3】关闭三级栏目菜单</p>
        <p style="word-break:break-all;">配置模块独立表：【moduletable】配置多表自动获取当前模块表，不同模块调用不同数据表</p>
        <p style="word-break:break-all;">系统目录：plugins/modulepara/</p>
        <p style="word-break:break-all;">模板配置：themes/simpleboot3/model/</p>
        <p style="word-break:break-all;">模块标识：自定义模块，自定义栏目，自定义插件，自定义扩展，自定义配置，自定义区块，自定义单页，自定义分类，自定义模型</p>
        <p style="word-break:break-all;">系统配置：公用内容代码，功能扩展配置，单页内容代码，页面扩展配置，系统扩展配置，系统信息配置，栏目菜单配置，栏目模块配置</p>
        <p style="word-break:break-all;">核心函数：insertmoduleparameter 插入模块参数 updatemoduleparameter 修改模块参数</p>
        <p>configmoduleparameter 配置模块参数 getmoduleparameter 获取模块参数 deletemoduleparameter 删除模块参数</p>
        <p style="word-break:break-all;">基本配置：themes/simpleboot3/model/config/config.php configother.php info.php module.php</p>
        <p style="word-break:break-all;">配置模块：themes/simpleboot3/model/config/configmodule.php configothermodule.php</p>
        <p style="word-break:break-all;">模块参数：parameter 默认参数表 paramter_default 文章默认表 parameter_list 参数列表 modulepara_plists</p>
        <p>parameter_json 参数json parameter_exp 扩展表修改 parameter_expplist 扩展参数表修改</p>
        <p style="word-break:break-all;">参数类型：imgtype_ 图片类型 filetype_ 文件类型 arrtype_ 数组类型
        jsontype_ JSON类型 inctype_ 默认调用类型 incfiletype_ 图片文件调用类型 recpara_ 推荐参数 示例：parameter[jsontype_fieldname] parameter_default[jsontype_fieldname]</p>
        <p style="word-break:break-all;">字段类型：5种类型 => info 默认字符串参数 tintpara_ 小型整数 intpara_ 整数参数
        decpara_ 小数参数 textpara 文本参数 示例：parameter[textpara_jsontype_fieldname]</p>
    </div>
</div>
<php>}</php>
<script type="text/javascript" src="/plugins/styleplugins/js/styleplugins.min.js"></script>
<script src="__STATIC__/js/admin.js"></script>
<php>
    $lang_set=defined('LANG_SET')?LANG_SET:'';
    $thinkcmf_version=defined('THINKCMF_VERSION')?THINKCMF_VERSION:'';
</php>
<script>

	var articleUrl = "{:geturldecode(cmf_url('portal/Article/index',array('id'=>'(id)','cid'=>'(category_id)')))}";

	// 自定义装修排序功能
    Wind.css('dragula');
    Wind.use('masonry', 'imagesloaded', 'dragula', function () {
        var $homeGrid = $('.home-grid').masonry({
            // set itemSelector so .grid-sizer is not used in layout
            itemSelector: '.grid-item',
            // use element for option
            columnWidth: '.grid-sizer',
            percentPosition: true,
            horizontalOrder: false,
            transitionDuration: 0
        });

        $homeGrid.masonry('on', 'layoutComplete', function (event, laidOutItems) {
        });


        $homeGrid.masonry();

		// 自定义装修排序加入控制器HTML元素进行排序，暂时关闭
        var containers = [];
        $('.home-grid .grid-item').each(function () {
            //containers.push(this);
        });
        dragula(containers, {
            isContainer: function (el) {
                return false; // only elements in drake.containers will be taken into account
            },
            moves: function (el, source, handle, sibling) {
                return true; // elements are always draggable by default
            },
            accepts: function (el, target, source, sibling) {
                return true; // elements can be dropped in any of the `containers` by default
            },
            invalid: function (el, handle) {
                return false; // don't prevent any drags from initiating by default
            },
            direction: 'vertical',             // Y axis is considered when determining where an element would be dropped
            copy: false,                       // elements are moved by default, not copied
            copySortSource: false,             // elements in copy-source containers can be reordered
            revertOnSpill: false,              // spilling will put the element back where it was dragged from, if this is true
            removeOnSpill: false,              // spilling will `.remove` the element, if this is true
            mirrorContainer: document.body,    // set the element that gets mirror elements appended
            ignoreInputTextSelection: true     // allows users to select input text, see details below
        }).on('drop', function (el, target, source, sibling) {
            var $target          = $(target);
            var targetClasses    = $target.attr('class');
            var targetDataWidget = $target.data('widget');
            var targetDataSystem = $target.data('system');
            var $source          = $(source);
            var sourceClasses    = $source.attr('class');
            var sourceDataWidget = $source.data('widget');
            var sourceDataSystem = $source.data('system');
            $(source).append($(target).find('.dashboard-box').not('.gu-transit'));
            $(target).append(el);
            $target.attr('class', sourceClasses);
            $target.data('widget', sourceDataWidget);
            $target.data('system', sourceDataSystem);

            $source.attr('class', targetClasses);
            $source.data('widget', targetDataWidget);
            $source.data('system', targetDataSystem);
            $homeGrid.masonry();

            _widgetSort();
        }).on('shadow', function (el, container, source) {
            $homeGrid.masonry();
        });


    });

    function _widgetSort() {

        var widgets = [];
        $('.home-grid .grid-item').each(function () {
            var $this = $(this);

            widgets.push({
                name: $this.data('widget'),
                is_system: $this.data('system')
            });
        });

        $.ajax({
            url: "{:url('main/dashboardWidget')}",
            type: 'post',
            dataType: 'json',
            data: {widgets: widgets},
            success: function (data) {

            },
            error: function () {

            },
            complete: function () {

            }
        });
    }

    //获取官方通知
    $.getJSON("/portal/admin_ajax/index.html?ajaxid={$configinfo['adminnews1id']}&ajaxname=configmodule&limit=10",
        function (data) {
			var content = data.content;
            var tpl      = '<li style="width:100%;float:left; height:28px; line-height:28px; overflow:hidden;"><span class="title" style="float:left; width:75%;"></span><span class="date" style="float:right;"></span></li>';
            var $notices = $("#thinkcmf-notices");
            $notices.empty();
            if (content.length > 0) {
                //$('#thinkcmf-notices-grid').show();
                $.each(content, function (i, n) {
                    var $tpl = $(tpl);
					$(".title", $tpl).html("<a href='"+stylePlugins.repDynamicUrl(articleUrl, {id:n.id,category_id:n.category_id}, {left: "(", right: ")"})+"' target='_blank'>"+n.post_title+"</a>");
                    $(".date", $tpl).html(n.published_time);
                    $notices.append($tpl);
                });
            } else {
                $notices.append("<li>^_^,{:lang('NO_NOTICE')}~~</li>");
            }

        });
	$.getJSON("/portal/admin_ajax/index.html?ajaxid={$configinfo['adminnews2id']}&ajaxname=configmodule&limit=10",
        function (data) {
			var content = data.content;
            var tpl      = '<li><span class="title" style="float:left; width:75%;"></span><span class="date" style="float:right;"></span></li>';
            var $notices = $("#thinkcmf-notices2");
            $notices.empty();
            if (content.length > 0) {
                //$('#thinkcmf-notices-grid').show();
                $.each(content, function (i, n) {
                    var $tpl = $(tpl);
					$(".title", $tpl).html("<a href='"+stylePlugins.repDynamicUrl(articleUrl, {id:n.id,category_id:n.category_id}, {left: "(", right: ")"})+"' target='_blank'>"+n.post_title+"</a>");
                    $(".date", $tpl).html(n.published_time);
                    $notices.append($tpl);
                });
            } else {
                $notices.append("<li>^_^,{:lang('NO_NOTICE')}~~</li>");
            }

        });
	$.getJSON("/portal/admin_ajax/index.html?ajaxid={$configinfo['adminnews3id']}&ajaxname=configmodule&limit=10",
        function (data) {
			var content = data.content;
            var tpl      = '<li><span class="title" style="float:left; width:75%;"></span><span class="date" style="float:right;"></span></li>';
            var $notices = $("#thinkcmf-notices3");
            $notices.empty();
            if (content.length > 0) {
                //$('#thinkcmf-notices-grid').show();
                $.each(content, function (i, n) {
                    var $tpl = $(tpl);
					$(".title", $tpl).html("<a href='"+stylePlugins.repDynamicUrl(articleUrl, {id:n.id,category_id:n.category_id}, {left: "(", right: ")"})+"' target='_blank'>"+n.post_title+"</a>");
                    $(".date", $tpl).html(n.published_time);
                    $notices.append($tpl);
                });
            } else {
                $notices.append("<li>^_^,{:lang('NO_NOTICE')}~~</li>");
            }

        });
</script>
<hook name="admin_before_body_end"/>
</body>
</html>